//
//  AESubmitOrderViewModel.m
//  AESOLAR_IOS
//
//  Created by Bin Tang on 2024/10/14.
//  Copyright © 2024 Mr.Wang. All rights reserved.
//

#import "AESubmitOrderViewModel.h"
#import "AE_Solar-Swift.h"

@implementation AESubmitOrderViewModel

- (void)initialize {
    [super initialize];
    
}


/// 下单商品
/// - Parameter completion: completion description
- (void)requestWithConfirmOrder:(RequestCompletionBlock)completion {
    @weakify(self);
    AEProductConfirmOrderRequest *request = [[AEProductConfirmOrderRequest alloc] initWithProductId:self.goodsInfoModel.id];
    [request startWithCompletionBlockWithSuccess:^(__kindof TYZBaseRequest * _Nonnull request) {
        @strongify(self);
        [self sendResponseObject:request.responseModelObject completion:completion];
    } failure:^(__kindof TYZBaseRequest * _Nonnull request) {
        @strongify(self);
        [self sendResponseObject:request.responseModelObject completion:completion];
    }];
}

@end
